- content_for :javascript do
  initialize_login_form(#{params[:password_forgotten]});

- content_for :title_header do
  %h1= @facebook_merge ? t('.connect_your_facebook_to_kassi') : t('.login_to_kassi')

.login-form.centered-section-narrow
  - if facebook_connect_in_use?
    = render :partial => "layouts/facebook_connect_button", :locals => { :button_text => t(".log_in_with_your_provider_account", provider: 'Facebook') }
  - if google_connect_in_use?
    = link_to person_google_oauth2_omniauth_authorize_path, id: 'google-oauth2-login', method: :post,
      class: 'google-login-button' do
      %span.google-icon
        = render :partial => "layouts/google_icon"
      %span.google-text
        = t('.log_in_with_your_provider_account', provider: 'Google')
  - if linkedin_connect_in_use?
    = link_to person_linkedin_omniauth_authorize_path, id: 'linkedin-login', method: :post,
      class: 'linkedin-login-button' do
      %span.linkedin-icon
        = render :partial => "layouts/linkedin_icon"
      %span.linkedin-text
        = t('.log_in_with_your_provider_account', provider: 'LinkedIn')
  - if facebook_connect_in_use? || google_connect_in_use? || linkedin_connect_in_use?
    %p= t(".or_sign_up_with_your_username")
  = form_tag("#{APP_CONFIG.login_domain}#{sessions_path}",:action => "create") do
    %label{:for => "login"}
      = username_or_email_label + ":"
    = text_field_tag "person[login]", nil, :value => session[:form_login], :class => :text_field, :id => :main_person_login, :autofocus => true
    %label{:for => "password"}
      = t('common.password') + ":"
    = password_field_tag "person[password]", nil, :class => :text_field, :id => :main_person_password
    = button_tag(t('.login'), :class => "send_button", :id => :main_log_in_button)
    .links
      - unless @facebook_merge
        = link_to t('.create_new_account'), (@current_community ? sign_up_path : new_tribe_path), :class => "green_part_link"
        %br/
      = link_to t('.i_forgot_my_password'), "#", :id => "password_forgotten_link", :class => "green_part_link"

#password_forgotten
  = render :partial => "sessions/password_forgotten"
